{extend name="layout/base"/}
{block name="content"}
{load href="__BKD__/js/dataLoader.js"/}
<style>
    .form-input, .form-no-label{
        width: 75%!important;
    }
    .page-content{
        padding-top: 0;
    }
</style>
<div class="page-title">
    <h3 class="ui header"> 录入成绩</h3>
</div>
<div style="padding-top: 70px;">
    <form class="ui small form" id="section-form">
        <div class="inline field">
            <label class="form-label">选择班级</label>
            <select name="clazz_id" class="ui tiny form-input dropdowner">
                <option value="">请选择</option>
                {volist name="data.clazz" id="v"}
                <option value="{$key}">{$v}</option>
                {/volist}
            </select>
        </div>
        <div class="inline field">
            <label class="form-label">选择考试</label>
            <select name="test_id" class="ui tiny form-input dropdowner">
                <option value="">请选择</option>
                {volist name="data.test" id="v"}
                <option value="{$key}">{$v}</option>
                {/volist}
            </select>
        </div>

        <div style="text-align: center; margin: 30px;">
            <button type="button" class="ui teal small button" style="width: 150px;" onclick="startSubmit(0)">按对错录分</button>
            <button type="button" class="ui teal small button" style="width: 150px;" onclick="startSubmit(1)">按答案录分</button>
            <button type="button" class="ui teal small button" style="width: 150px;" onclick="startSubmit(2)">按分数录分</button>
        </div>
    </form>
</div>

{/block}
{block name="script"}
<script>
    function startSubmit(type) {
        var p = $('#section-form').serialize();
        location.href = "{:url('inputScore')}?" + p + "&type=" + type;
    }
</script>
{/block}